﻿

using Microsoft.AspNetCore.Http;

namespace Simple.Services
{
    public class ParentChildTasksInputModel : PageInputModel
    {
        /// <summary>
        /// 班级id
        /// </summary>
        public Guid? ClassId { get; set; }

        /// <summary>
        /// 标题
        /// </summary>
        public string? Title { get; set; }
    }

    public class TasksCreateOrUpdateInput : ModelBase
    {
        /// <summary>
        /// 编号
        /// </summary>
        public Guid? Id { get; set; }

        /// <summary>
        /// 标题
        /// </summary>
        [Required(ErrorMessage = "标题不能为空")]
        public string? Title { get; set; }

        /// <summary>
        /// 任务简介
        /// </summary>
        [Required(ErrorMessage = "任务简介不能为空")]
        public string? TaskIntroduction { get; set; }

        /// <summary>
        /// 发布班级
        /// </summary>
        public Guid? ClassId { get; set; }

        /// <summary>
        /// 打卡天数
        /// </summary>
        public int ClockInDays { get; set; }

        /// <summary>
        /// 开始时间
        /// </summary>
        public DateTime? StartDate { get; set; }

        /// <summary>
        /// 结束时间
        /// </summary>
        public DateTime? EndDate { get; set; }

        /// <summary>
        /// 每日打卡截止时间
        /// </summary>
        public string? DailyClockInDeadline { get; set; }

        /// <summary>
        /// 图片idjihe 
        /// </summary>
        public List<Guid>? ImageIdList { get; set; } = null;

        /// <summary>
        /// 图片
        /// </summary>
        //public List<IFormFile>? ImageList { get; set; } = null;

        public override void ConfigureMapper(Profile profile)
        {
            profile.CreateMap<ParentChildTasks, TasksCreateOrUpdateInput>();

            profile.CreateMap<TasksCreateOrUpdateInput, ParentChildTasks>();

        }
    }

    public class AddTasksInput
    {
        /// <summary>
        /// 任务内容
        /// </summary>
        public TasksCreateOrUpdateInput TaskInfo { get; set; }

        /// <summary>
        /// 班级集合
        /// </summary>
        public List<Guid>? ClassIdList { get; set; }
    }

    public class TasksListInput
    {
        public ParentChildTasksState State { get; set; } = ParentChildTasksState.HaveInHand;
    }

    public class ReleaseInput
    {
        /// <summary>
        /// 任务id
        /// </summary>
        public Guid ParentChildTasksId { get; set; }

        /// <summary>
        /// 记录内容
        /// </summary>
        public string? Content { get; set; }

        /// <summary>
        /// 图片idjihe 
        /// </summary>
        public List<Guid>? ImageIdList { get; set; } = null;

    }

    public class CompleteStatisticsInput
    {
        /// <summary>
        /// 任务id
        /// </summary>
        public Guid ParentChildTasksId { get; set; }

        /// <summary>
        /// 时间
        /// </summary>
        public DateTime? dateTime { get; set; }
    }
}

